package com.atguigu.educms.service.impl;

import com.atguigu.educms.entity.CmsContactInfo;
import com.atguigu.educms.mapper.CmsContactInfoMapper;
import com.atguigu.educms.service.CmsContactInfoService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 联系信息 服务实现类
 * </p>
 *
 * @author Panghl
 * @since 2021-03-11
 */
@Service
public class CmsContactInfoServiceImpl extends ServiceImpl<CmsContactInfoMapper, CmsContactInfo> implements CmsContactInfoService {

    @Override
    public CmsContactInfo getContact() {
        return baseMapper.selectOne(new QueryWrapper<CmsContactInfo>().last("limit 1"));
    }
}
